package com.tg.demo.config;

import com.tg.demo.entity.User;

/**
 * Created by dulichao on 2017/3/23.
 */
public class SysUserContext {
    private static final ThreadLocal<User> sysUserHolder = new ThreadLocal<>();

    public static  void setSysUser(User user){
        sysUserHolder.set(user);
    }


    public static User getSysUser(){
        return sysUserHolder.get();
    }

    public static void remove(){
        sysUserHolder.remove();
    }
}
